package jjn.kamacoder.case15;

import java.util.Scanner;

/**
 * @author Jjn
 * @since 2023-08-31 11:07
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int count = scanner.nextInt();
            scanner.nextLine();
            for (int i = 0; i < count; i++) {
                String first = scanner.nextLine();
                String second = scanner.nextLine();
                StringBuilder stringBuilder = new StringBuilder();
                for (int j = 0; j < first.length() / 2; j++) {
                    stringBuilder.append(first.charAt(j));
                }
                stringBuilder.append(second);
                for (int j = first.length() / 2; j < first.length(); j++) {
                    stringBuilder.append(first.charAt(j));
                }
                System.out.println(stringBuilder);
            }
        }
    }
}
